home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / bpl70n15.zip / README.DOC < prev    next >
Text File  |  1994-03-18  |  19KB  |  374 lines

  1.      Borland-Pascal 7.0 Runtime Libary Update - Release 1.4   18-MAR-1994
  2.  
  3.  
  4.      Welcome to BPL70N15.ZIP, a collection of fast replacement libraries
  5.      for your Turbo Pascal 7.0 / Borland Pascal 7.0 compiler. There are
  6.      three libraries in this package, a real mode library (TURBO.TPL), a
  7.      DOS protected mode library (TPP.TPL), and a Windows library (TPW.TPL).
  8.      Every file is a complete replacement for the original library bearing
  9.      the same name that came with your Pascal compiler. Due to the many
  10.      optimizations in the replacement libraries, many programs compiled
  11.      with these libraries will run faster. For more detailed information
  12.      on possible performance improvements, see the file PERFORM.DOC. Only
  13.      performance information for real mode and DOS protected mode programs
  14.      can be provided at the moment.
  15.  
  16.      Those users already familiar with my previous project, the fast
  17.      replacement library for Turbo Pascal 6.0 (distributed as TPL60N19.ZIP),
  18.      may be disappointed that not all the features of that program have
  19.      been included in BPL70N15.ZIP yet. I don't have much time at the moment,
  20.      but still wanted to provide a BP 7.0 version of my library as soon as
  21.      possible. So I decided to port the performance relevant stuff first
  22.      and work on the other aspects later.
  23.  
  24.      The libaries in BPL70N15 maintain 99.9% compatibility with the original
  25.      libraries. Differences are mostly caused by bug fixes and enhancements.
  26.      Some bugs from the original libraries supplied by Borland have been
  27.      eliminated, but there can be no guarantee that new ones have not crept
  28.      in. Most of the code in the BPL70N15.ZIP libraries was ported from the
  29.      latest version of my fast replacement library for Turbo Pascal 6.0,
  30.      TPL60N19.ZIP, which has been proven to be a stable and reliable product.
  31.  
  32.      If you discover any bugs, or have other comments, please let me know.
  33.      My email and snail mail addresses are given below. Although I am under
  34.      severe time constraints, I will try as hard as possible to fix any bugs
  35.      reported in as short a time as possible.
  36.  
  37.      The legal conditions under which Borland is distributing the source code
  38.      of the Borland Pascal 7.0 run-time libraries are not entirely clear to me.
  39.      To stay on the safe side, I assume that they are the same as for the RTL
  40.      source for the TP 6.0 compiler. Under these conditions, I am not allowed
  41.      to distribute modified source modules from the library. I may only
  42.      provide the binaries to third parties. However, some of the modules in
  43.      the BPL70N15.ZIP libaries do not contain a single line of code written
  44.      by Borland and are written entirely by me. I am including the source for
  45.      these modules for your reference. The source of the arithmetic routines
  46.      can be found in the file ARISOURC.ZIP. The source code of most of the
  47.      string routines is contained in the file STRSOURC.ZIP. The code of the
  48.      arithmetic and string routines is hereby released into the public domain.
  49.      You may use it in your own programs under the condition that you do not
  50.      include it into a commercial product. Parties interested in commercial
  51.      use of my code should contact me at my address below.
  52.  
  53.  
  54.      Original library code is Copyright (C) 1983,92 Borland International
  55.  
  56.  
  57.      New / additional library code is Copyright (C) 1988-1994
  58.  
  59.      Norbert Juffa, Wielandtstr. 14, 76137 Karlsruhe, Germany
  60.      Internet: S_JUFFA@IRAVCL.IRA.UKA.DE
  61.  
  62.  
  63.  
  64.      Contents of this document:
  65.  
  66.      I.   Capabilities of RTL replacement
  67.      II.  Revision History
  68.      III. References
  69.  
  70.  
  71.  
  72.      I. Capabilities of RTL replacement
  73.      ==================================
  74.  
  75.  
  76.      General note:
  77.  
  78.      BPL70N15 provides you with optimized libraries, it does not enhance
  79.      the code produced by the Borland Pascal compiler. Thus, only code
  80.      that uses many library calls can be expected to experience significant
  81.      performance advantages. Library calls are made by BP 7.0 to operate
  82.      on LONGINTs, STRINGs, REALs, SETs, perform heap operations such as
  83.      allocating and deallocating memory (New, Dispose, GetMem, FreeMem),
  84.      as well as to perform other tasks. One exception where BPL70N15 speeds
  85.      up your code although no calls to optimized library routines are
  86.      made is floating-point applications using a 287 or 387 coprocessor.
  87.  
  88.      If want to speed up your applications even further than can be
  89.      accomplished by using BPL70N15, you might want to look at the
  90.      "Sally TPU peephole optimizer" (SPO for short) written by Morten
  91.      Welinder (terra@diku.dk). Unlike BPL70N15, this program is not in
  92.      the public domain, but Morten grants free use of the program for
  93.      personal, non-commercial use. SPO is a peephole optimizer that aims
  94.      at optimizing the code produced by the Pascal compiler. Peephole
  95.      optimizations means that the optimizer looks at a rather small
  96.      collection of machine instructions at a time and replaces certain
  97.      sequences it finds with optimized code. A TPU-optimizer speeds up
  98.      those parts of a program that can't be enhanced by a replacement
  99.      library and vice versa. So it might be a good idea to combine both
  100.      tools to get the best performance out of your BP 7.0 programs. The
  101.      SPO optimizer is currently distributed as a file SPO120.ZIP. It
  102.      should be available from all ftp-sites that carry BPL70N15 and in
  103.      particular can be downloaded from garbo.uwasa.fi, which is the upload
  104.      site for the program. Please note that this is not intended to be
  105.      an endorsement of the program. Rather, the info provided should be
  106.      thought of as being a service to those users of BPL70N15 who want
  107.      to speed up their programs even further than possible by using
  108.      BPL70N15.
  109.  
  110.  
  111.      Improvements in SYSTEM module
  112.      -----------------------------
  113.  
  114. o    REAL type software arithmetic operations now comply with ANSI/IEEE
  115.      Standard 754-1985 for Binary Floating Point Arithmetic [1,2] as much
  116.      as possible. Note that REAL arithmetic by design differs from the
  117.      standard in many ways, especially available numeric formats, value
  118.      set, and available operations. The rounding mode implemented here
  119.      is "round to nearest or even" as specified by the standard. Add,
  120.      Subtract, Multiply, Squaring, Division, and Square Root deliver
  121.      exact results with regard to this rounding mode, as demanded by the
  122.      standard. Conversions from REAL to LONGINT and from EXTENDED to REAL
  123.      use rounding to nearest or even, as specified in the standard. Correct
  124.      implementation of above features was tested with the PARANOIA test
  125.      program [3]. The correctness of basic REAL arithmetic functions has
  126.      also been tested against the coprocessor/emulator EXTENDED format
  127.      with the program FUN1_TST. The EXTENDED format carries approximately
  128.      19 decimal digits of precision. This description applies to all three
  129.      libraries in the package.
  130.  
  131. o    REAL arithmetic operations have been sped up. Speed-up for SQRT varies
  132.      between a factor of 11 for a 8086 and 30 for a 486DLC. FRAC now executes
  133.      at twice the original speed and speed-up is between 50% and 100% for
  134.      SIN, COS, ARCTAN, LN, EXP and division (2.8x speed up for division on
  135.      80386). Overall numeric processing power using REAL arithmetic increases
  136.      by about 52% for an 8086 and by 85% for an Cyrix 486DLC as measured
  137.      by the WHETSTONE benchmark [4,5]. This description applies to all three
  138.      libraries, but the actual values cited are for the real mode library
  139.      TURBO.TPL and may be different for the other libraries. In general,
  140.      DOS protected mode and Windows programs tend to be slower than real mode
  141.      programs by 5-50%.
  142.  
  143. o    Overall accuracy of REAL arithmetic transcendental functions has been
  144.      improved as indicated by Cody&Waite's ELEFUNT tests [6]: DLOG, DEXP,
  145.      DATAN, DSIN. Correct argument reduction ensures that relative error
  146.      over the whol